package com.cxc.mp.simple.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class DatabaseConfig {

    @Value("${spring.datasource.url}")
    private String url;

    @Value("${spring.datasource.username}")
    private String username;

    @Value("${spring.datasource.password}")
    private String password;

    // 提供一个方法来获取数据库连接属性
    public void setDatabaseProperties(String url, String username, String password) {
        // 这里可以进行一些逻辑处理，比如设置到静态变量或单例对象
        System.out.println("Database properties set: URL=" + url + ", Username=" + username + ", Password=" + password);
    }
}